<% @page_title = " :: #{@program.name}" %>

<% content_for :sidebar do %>
	<div class="little_infos">
		<%= render :partial => 'shared/show_authors', :locals => { :authors => @authors } %>
	</div>
	
	<div class="little_infos">
		<div class="little_content">
			<span class="sidebar_title">Create</span>
			<%= associate_broadcast_to_program(@program) %>
		</div>
		
		<div class="little_content">
			<span class="sidebar_title">Edit</span>
			<%= link_to 'This Program<br />', :action => 'edit', :id => @program if @program.is_updatable_by(current_user) %>
			<%= link_to "Program's Authors", :action => 'authors', :id => @program if @program.is_updatable_by(current_user) %>
		</div>
	</div>
	
	<div class="little_infos">
		<div class="little_content">
			<%= related_tags_title %>
			<div id="tag_cloud" class="little_content">
				<%= render :partial => 'shared/tag_cloud', :locals => { :tags => @tags, :controller => 'programs' } %>
			</div>
		</div>
	</div>
<% end %>

<h1><b>Program: </b><%= "#{@program.name}" %></h1>

<p><label for="short_description">Short Description: </label>
<%= "#{@program.short_description}" %></p>

<p><label for="description">Description: </label>
<%= "#{@program.description}" %></p>

<p><label for="created_at">Created at: </label>
<%= "#{@program.created_at.to_date}" %></p>

<%= render :partial => 'shared/tagging', :locals => { :resource => @program, :controller => 'programs' } %>

<% if @program.can_be_replicated_by(current_user) %>
	<%= '<hr class="main" /><br /><b>Replication:</b><br />' %>
	<div id="replication" class="span-15 push-1 centered_box_bordered">
		<%= render :partial => 'replication', :locals => { :program => @program, 
				:active_replication_systems => @active_replication_systems,
				:inactive_replication_systems => @inactive_replication_systems } %>
	</div>
<% end %>

<%= '<hr class="main" /><br /><b>Broadcasts:</b><br />' %>
<%= render :partial => 'broadcasts/list', :locals => { :broadcasts => @program.broadcasts } %>